import RoleModel from '../models/role.model';
import { ObjectType } from '../types';
import {BaseInsertDto, BaseUpdateDto} from './.dto';

/** 角色列表DTO */
export class RoleListDto implements ObjectType, Partial<RoleModel> {
  id: string = '';
  name: string = '';
}

/** 角色单个DTO */
export class RoleSingleDto implements ObjectType, Partial<RoleModel> {
  id: string = '';
  name: string = '';
}

/** 角色创建DTO */
export class RoleCreateDto extends BaseInsertDto implements Partial<RoleModel> {
  name: string = '';
}

/** 角色更新DTO */
export class RoleUpdateDto extends BaseUpdateDto implements Partial<RoleModel> {
  name: string = '';
}

/**
 * @swagger
 * components:
 *   schemas:
 *     RoleListDto:
 *       type: object
 *       properties:
 *         id:
 *           type: integer
 *           description: 角色的唯一标识符
 *           example: 1
 *         name:
 *           type: string
 *           description: 角色名称，描述角色的功能或权限
 *           example: '管理员'
 *     RoleSingleDto:
 *       allOf:
 *         - $ref: '#/components/schemas/RoleListDto'
 *     RoleCreateDto:
 *       type: object
 *       properties:
 *         name:
 *           type: string
 *           description: 角色名称，描述角色的功能或权限
 *           example: '管理员'
 *     RoleUpdateDto:
 *       type: object
 *       properties:
 *         name:
 *           type: string
 *           description: 角色名称，描述角色的功能或权限
 *           example: '管理员'
 */
